import request from '@/utils/request'
let baseUrl = process.env.NODE_ENV === 'production' ? 'api/report' : '/report'
export const list = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/list',
    method: 'post',
    data
  })
export const workTable = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table',
    method: 'post',
    data
  })
export const preview = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/preview',
    method: 'post',
    data
  })
export const batchCreate = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/batch-create',
    method: 'post',
    data
  })
export const sqlCreate = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/sql-create',
    method: 'post',
    data
  })
export const sqlTest = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/sql-test',
    method: 'post',
    data
  })
export const update = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/update',
    method: 'post',
    data
  })
export const deleteWt = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/delete',
    method: 'post',
    data
  })
export const updateWorkTable = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/statistics/work-table/sync-work-table',
    method: 'post',
    data
  })
